/**
 * @Date 2023-02-21 14:00:07
 * @Remark
 */

// lib
// import moment from "moment";
// config
// script & methods & public

// store
import { state } from "./state";
// service
// interface
import { ReqIllegalPage } from "biz/Illegal/api";
import { getIllegalPageService } from "biz/Illegal/service";

export async function getLostRecordPage() {
  const sp = state.getSearch();
  const params: ReqIllegalPage = {
    ...sp,
    type:'LOST',
    pageNum: state.page,
    pageSize: state.size,
  };
  state.loading = true;
  const result = await getIllegalPageService(params);
  state.loading = false;
  if (result.payload) {
    state.total = result.payload.total;
    state.list = result.payload.list;
  }
}

export async function didMount() {
  getLostRecordPage();
}
